package com.example.shengyin.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

@ApiModel(description = "问卷信息")
@Data
public class Survey implements Serializable {

    @ApiModelProperty(value = "问卷ID", example = "1")
    private Long id;


    @ApiModelProperty(value = "题号", example = "1,2,3")
    @NotBlank(message = "题号不能为空")
    private String choseques;
    private List<SurveyQues> ques = new ArrayList<>();
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    @ApiModelProperty(value = "发布时间", example = "2022-01-12-10-15")
    private Date posttime;

    @ApiModelProperty(value = "用户id", example = "1")
    @NotNull(message = "用户id不能为空")
    private Long userid;

    @ApiModelProperty(value = "手机号", example = "13845678985")
    @Pattern(regexp = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$",message = "请输入正确的手机号！")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty(value = "得分", example = "100")
    private Short score;
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    @ApiModelProperty(value = "结束时间", example = "2022-12-12")
    private Date finishtime;

    @ApiModelProperty(value = "类别", example = "1，2，3")
    private Long stype;

    @ApiModelProperty(value = "用户选择", example = "2：3：4")
    @NotBlank(message = "用户选择不能为空")
    private String choseanswer;

    @ApiModelProperty(value = "用户名", example = "lihd")
    private String  uname;

    @ApiModelProperty(value = "症状类型", example = "智力障碍")
    private String  symType;

    private List<SurveyQues> list;
    private String symname;





}